package com.bm.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ejyy_vistor
 */
@TableName(value ="ejyy_vistor")
@Data
public class EjyyVistor implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long communityId;

    /**
     * 
     */
    private Long buildingId;

    /**
     * 
     */
    private Long wechatMpUserId;

    /**
     * 
     */
    private Long propertyCompanyUserId;

    /**
     * 
     */
    private String vistorName;

    /**
     * 
     */
    private String vistorPhone;

    /**
     * 
     */
    private String carNumber;

    /**
     * 
     */
    private Boolean haveVistorInfo;

    /**
     * 
     */
    private Long expire;

    /**
     * 
     */
    private Long usedAt;

    /**
     * 
     */
    private Long scanBy;

    /**
     * 
     */
    private Long createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EjyyVistor other = (EjyyVistor) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCommunityId() == null ? other.getCommunityId() == null : this.getCommunityId().equals(other.getCommunityId()))
            && (this.getBuildingId() == null ? other.getBuildingId() == null : this.getBuildingId().equals(other.getBuildingId()))
            && (this.getWechatMpUserId() == null ? other.getWechatMpUserId() == null : this.getWechatMpUserId().equals(other.getWechatMpUserId()))
            && (this.getPropertyCompanyUserId() == null ? other.getPropertyCompanyUserId() == null : this.getPropertyCompanyUserId().equals(other.getPropertyCompanyUserId()))
            && (this.getVistorName() == null ? other.getVistorName() == null : this.getVistorName().equals(other.getVistorName()))
            && (this.getVistorPhone() == null ? other.getVistorPhone() == null : this.getVistorPhone().equals(other.getVistorPhone()))
            && (this.getCarNumber() == null ? other.getCarNumber() == null : this.getCarNumber().equals(other.getCarNumber()))
            && (this.getHaveVistorInfo() == null ? other.getHaveVistorInfo() == null : this.getHaveVistorInfo().equals(other.getHaveVistorInfo()))
            && (this.getExpire() == null ? other.getExpire() == null : this.getExpire().equals(other.getExpire()))
            && (this.getUsedAt() == null ? other.getUsedAt() == null : this.getUsedAt().equals(other.getUsedAt()))
            && (this.getScanBy() == null ? other.getScanBy() == null : this.getScanBy().equals(other.getScanBy()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCommunityId() == null) ? 0 : getCommunityId().hashCode());
        result = prime * result + ((getBuildingId() == null) ? 0 : getBuildingId().hashCode());
        result = prime * result + ((getWechatMpUserId() == null) ? 0 : getWechatMpUserId().hashCode());
        result = prime * result + ((getPropertyCompanyUserId() == null) ? 0 : getPropertyCompanyUserId().hashCode());
        result = prime * result + ((getVistorName() == null) ? 0 : getVistorName().hashCode());
        result = prime * result + ((getVistorPhone() == null) ? 0 : getVistorPhone().hashCode());
        result = prime * result + ((getCarNumber() == null) ? 0 : getCarNumber().hashCode());
        result = prime * result + ((getHaveVistorInfo() == null) ? 0 : getHaveVistorInfo().hashCode());
        result = prime * result + ((getExpire() == null) ? 0 : getExpire().hashCode());
        result = prime * result + ((getUsedAt() == null) ? 0 : getUsedAt().hashCode());
        result = prime * result + ((getScanBy() == null) ? 0 : getScanBy().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", communityId=").append(communityId);
        sb.append(", buildingId=").append(buildingId);
        sb.append(", wechatMpUserId=").append(wechatMpUserId);
        sb.append(", propertyCompanyUserId=").append(propertyCompanyUserId);
        sb.append(", vistorName=").append(vistorName);
        sb.append(", vistorPhone=").append(vistorPhone);
        sb.append(", carNumber=").append(carNumber);
        sb.append(", haveVistorInfo=").append(haveVistorInfo);
        sb.append(", expire=").append(expire);
        sb.append(", usedAt=").append(usedAt);
        sb.append(", scanBy=").append(scanBy);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}